package cn.jsu.oj.dispatchServer.mapper;

import cn.jsu.oj.dispatchServer.pojo.dto.TestChangeScore;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Mapper
@Repository
public interface ResultMapper {

//    void updateJudgeResultInfo(JudgeResult judgeResult);

    List<TestChangeScore> testChangeScores(@Param("serialNumber") long serialNumber);


    Integer updateSubmitTopic(@Param("serialNumber") Long serialNumber,
                              @Param("runTime")Integer runTime,
                              @Param("runMemory")Integer runMemory,
                              @Param("compilationInfo") String compilationInfo,
                              @Param("score") Integer score);

    Integer insertJudgePointResult(@Param("testPointNumber") Integer testPointNumber,
                                   @Param("serialNumber") Long serialNumber,
                                   @Param("runTime")Integer runTime,
                                   @Param("runMemory")Integer runMemory,
                                   @Param("situationId") Byte situationId,
                                   @Param("judgePointScore") Integer judgePointScore);

    List<TestChangeScore> testPointScores(long serialNumber);
}
